const instanceMap = new Map();

/**
 * 全局instance管理
 */
class InsUtils {

    setIns = (key: string, ins: any) => {
        instanceMap.set(key, ins);
    }

    getIns = (key: string) => {
        return instanceMap.get(key);
    }

    removeIns = (key: string) => {
        return instanceMap.delete(key);
    }
}

export default InsUtils;
